<template>
  <div v-for="(item,key) in list" :key="key" class="item">
      <p>{{ item.content }}</p>
      <p>金额：￥{{item.total}}元</p>
      <p>时间：{{ item.createtime_text }}</p>
  </div>
</template>

<script setup>

  const {proxy} = getCurrentInstance()

  let list = ref([])

  onMounted(async ()=>{
      var result = await proxy.$POST({
        url:'/business/record',
        params:{busid:proxy.$business.value.id}
      })
      if(result.code == 0){
        proxy.$fail(result.msg);
        return false
      }
      console.log(result.data)
      list.value = list.value.concat(result.data.list);

  })
</script>

<style scoped>
  .item{
    background:#fff;
    width:100%;
    text-indent: 1.5em;
    font-size:1em;
    padding:10px 0;
    border-bottom:1px solid #eaeaea;
  }
</style>